﻿<%@ Control Language="C#" Inherits="System.Web.Mvc.ViewUserControl<CRM.Models.EquipmentTypes>" %>

<%@ Import Namespace="CRM.Models" %>

<% Html.DevExpress().ComboBox(settings =>
   {
       settings.Name = "Vendors";
       settings.CallbackRouteValues =
          new { Controller = "EquipmentCombobox", Action = "VendorsPartial" };
       settings.Properties.CallbackPageSize = 10;
       settings.Properties.TextField = "VendorName";
       settings.Properties.ValueField = "IdVendor";
       settings.Properties.EnableCallbackMode = true;
       settings.Properties.ClientSideEvents.BeginCallback = "function(s, e) { e.customArgs['EquipmentType'] = EquipmentTypes.GetValue(); }";
       settings.Properties.ClientSideEvents.SelectedIndexChanged = "function(s, e) {  Models.PerformCallback();}";
   }).BindList(Model.Vendors).GetHtml(); %>